bitkeeper revision 1.7.1.1 (3decad1ePVKQauMNZAn2SK7OMrAlDg)
authorkaf24@plym.cl.cam.ac.uk <kaf24@plym.cl.cam.ac.uk>
Tue, 3 Dec 2002 13:09:50 +0000 (13:09 +0000)
committerkaf24@plym.cl.cam.ac.uk <kaf24@plym.cl.cam.ac.uk>
Tue, 3 Dec 2002 13:09:50 +0000 (13:09 +0000)
memory.c:
  Page-table update fix. Update even non-pagetable pages.

xen-2.4.16/common/memory.c

index 2d6069861e336ac29eba84001edad41c33ee5af3..7b2d25a07be1602309d5c41db70c6091b4a480a6 100644 (file)
@@ -580,6 +580,9 @@ int do_process_page_updates(page_update_request_t *updates, int count)
                     err = put_l2_table(cur.val >> PAGE_SHIFT);
                 }
                 break;
+            default:
+                MEM_LOG("Invalid page update command %08lx", cur.ptr);
+                break;
             }
         }
         else if ( (cur.ptr & (sizeof(l1_pgentry_t)-1)) || (pfn >= max_page) )
@@ -603,6 +606,19 @@ int do_process_page_updates(page_update_request_t *updates, int count)
                     err = mod_l2_entry((l2_pgentry_t *)__va(cur.ptr),
                                        mk_l2_pgentry(cur.val)); 
                     break;
+                default:
+                    /*
+                     * This might occur if a page-table update is
+                     * requested before we've inferred the type
+                     * of the containing page. It shouldn't happen
+                     * if page tables are built strictly top-down, so
+                     * we have a MEM_LOG warning message.
+                     */
+                    MEM_LOG("Unnecessary update to non-pt page %08lx",
+                            cur.ptr);
+                    *(unsigned long *)__va(cur.ptr) = cur.val;
+                    err = 0;
+                    break;
                 }
             }
         }